package com.stars.home.vmodel

import android.app.Activity
import android.app.Application
import androidx.lifecycle.MutableLiveData
import com.stars.home.model.bean.ChoseMapAddress
import com.stars.home.model.bean.TipsItem
import com.trailer.base.base.BRepository
import com.trailer.base.base.BViewModel


/**
 *Created by shihuiyun
 *on 2020/9/22
 */
class ChosePlaceVModel(application: Application) :  BViewModel<BRepository>(application) {


    val cityName: MutableLiveData<String> = MutableLiveData<String>()

    var choseItem: ChoseMapAddress? = null//选择的数据

    val isShow: MutableLiveData<Boolean> = MutableLiveData<Boolean>(false)

    val positionTitle: MutableLiveData<TipsItem> = MutableLiveData<TipsItem>()


    fun toClose(){
        ( repository().context as Activity).finish()
    }




    fun toChose(position: TipsItem){
        isShow.value=false
        positionTitle.value=position

    }




}
